<template>
	<u-picker :show="PickerShow" :columns="pickerColumns" @confirm="pickerConfirm" keyName="name" immediateChange
		@cancel="pickerCancel" @close="pickerCancel" ref="uPicker" :cancelText="$t('filed.quxiao')"
		:confirmText="$t('filed.queding')"></u-picker>
</template>

<script>
	export default {
		props: {

		},
		data() {
			return {
				PickerShow: false,
				pickerColumns: [
					[]
				]
			}
		},
		methods: {
			pickerCancel() {
				this.PickerShow = false
			},
			pickerOpen(event) {
				console.log(event)
				this.$refs.uPicker.setColumnValues(0, event)
				this.PickerShow = true
			},
			pickerConfirm(event) {
				this.$emit('pickerConfirm', event.value[0])
				this.$refs.uPicker.setColumnValues(0, [])
				this.$refs.uPicker.pickerInit();
				this.PickerShow = false
			}
		}
	}
</script>

<style>
</style>